<?php
namespace Home\Controller;

use Utuo\DistributionShopForeground;

class DisShopAdvController extends DistributionShopForeground {
	
	/**
	 * 初始化
	 */
	public function _init() {
		layout('disshop');
		$this->setModelName("DistributionShop");
		$this->setModelControllerName("DisShop");
		if ( in_array(ACTION_NAME, array()) ) { // 支持跳转获得用户信息
			$this->setSupportRedirect( isset($_REQUEST['debug']) ? false : true );
		}
		$this->setCheckLogin(false);
	}
	
	public function showAction() {
		$adv = M("DistributionShopAdv")->where(array('cid'=>$this->cid))->find();
		$adv['config'] = (array)unserialize($adv['config']);
		$this->assign("adv", $adv);
		$this->display("{$this->modelControllerName}/advShow");
	}
	
}